<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('behavior.modal');
JHtml::_('formbehavior.chosen', 'select');
		$db	 = &JFactory::getDBO();
		$user   = & JFactory::getUser();
	    $uid  	= $user->get('id');
		$query = $db->getQuery(true);
		// Select all records from the user profile table where key begins with "custom.".
		// Order it by the ordering field.
		$query->select('*');
		$query->from('#__user_profiles');
		$query->where('user_id='.$uid);
		// Reset the query using our newly populated query object.
		$db->setQuery($query);
		$results = $db->loadObjectList();
		foreach($results as $row){
			$domain_register 		= $row -> domain_register;
			$domain_completed 	   = $row -> domain_completed;
			$domain_created 		 = $row -> domain_created;
			$domain_email 		   = $row -> domain_email;
			$domain_name 		    = $row -> domain_name;
			$domain_purchase 		= $row -> domain_purchase;
			$domain_exprires 		= $row -> domain_exprires;
			$domain_manager		 = $row -> domain_manager;
			$domain_username 		= $row -> domain_register;
			$domain_password 		= $row -> domain_password;	
			
			$contact_name 	   = $row -> contact_name;
			$contact_email 	   = $row -> contact_email;
			$contact_address 	= $row -> contact_address;
			$contact_city 	   = $row -> contact_city;
			$contact_zip 		= $row -> contact_zip;
			$contact_state 	  = $row -> contact_state;
			$contact_phone 	  = $row -> contact_phone;
			$contact_fax		= $row -> contact_fax;
			$googleapi		  = $row -> google_api;
			$siteurl 			= $row -> site_url;
			
			/*$google 			= $row -> google;
			$facebook 	  	  = $row -> facebook;
			$twitter 		   = $row -> twitter;*/
			$meta_title 		= $row -> seo_title;
			$meta_keywork 	  = $row -> seo_meta_keyword;
			$meta_description  = $row -> seo_meta_description;
	    }
?>
<style>
	fieldset{ width:330px; float:left; margin-left:10px;}
</style>
<form action="<?php echo JRoute::_('index.php?option=com_profiles&task=saveProfile');?>" method="post" name="adminForm" id="adminForm">
	<fieldset>
    	<legend>Contact Information</legend>
        <div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_name" id="jform_contact_contact_name-lbl">Name</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_name;?>" id="jform_contact_contact_name" name="jform[contact][contact_name]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_email" id="jform_contact_contact_email-lbl">Email</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_email;?>" id="jform_contact_contact_email" name="jform[contact][contact_email]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_address" id="jform_contact_contact_address-lbl">Adress</label> 
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_address;?>" id="jform_contact_contact_address" name="jform[contact][contact_address]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_city" id="jform_contact_contact_city-lbl">City</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_city;?>" id="jform_contact_contact_city" name="jform[contact][contact_city]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_zip" id="jform_contact_contact_zip-lbl">Zip</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_zip;?>" id="jform_contact_contact_zip" name="jform[contact][contact_zip]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_state" id="jform_contact_contact_state-lbl">State</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_state;?>" id="jform_contact_contact_state" name="jform[contact][contact_state]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_phone" id="jform_contact_contact_phone-lbl">Phone</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_phone;?>" id="jform_contact_contact_phone" name="jform[contact][contact_phone]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_contact_fax" id="jform_contact_contact_fax-lbl">Fax</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$contact_fax;?>" id="jform_contact_contact_fax" name="jform[contact][contact_fax]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_googleapi" id="jform_contact_googleapi-lbl">Google API</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$googleapi;?>" id="jform_contact_googleapi" name="jform[contact][googleapi]">     
     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_contact_siteurl" id="jform_contact_siteurl-lbl">Site URL</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$siteurl;?>" id="jform_contact_siteurl" name="jform[contact][siteurl]">     
     </div>
</div>

    </fieldset>
	<fieldset>
    	<legend>Domain Information</legend>
        <div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_register" id="jform_domain_domain_register-lbl">Domain Register</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_register;?>" id="jform_domain_domain_register" name="jform[domain][domain_register]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_completed" id="jform_domain_domain_completed-lbl">Domain Completed</label>                                                                
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_completed;?>" id="jform_domain_domain_completed" name="jform[domain][domain_completed]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_created" id="jform_domain_domain_created-lbl">Domain Created</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_created;?>" id="jform_domain_domain_created" name="jform[domain][domain_created]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_email" id="jform_domain_domain_email-lbl">Domain Email</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_email;?>" id="jform_domain_domain_email" name="jform[domain][domain_email]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_name" id="jform_domain_domain_name-lbl">Domain Name</label>     
     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_name;?>" id="jform_domain_domain_name" name="jform[domain][domain_name]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_purchase" id="jform_domain_domain_purchase-lbl">Domain Purchase</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_purchase;?>" id="jform_domain_domain_purchase" name="jform[domain][domain_purchase]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_exprires" id="jform_domain_domain_exprires-lbl">Domain Exprires</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_exprires;?>" id="jform_domain_domain_exprires" name="jform[domain][domain_exprires]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_manager" id="jform_domain_domain_manager-lbl">Doamn Manager</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_manager;?>" id="jform_domain_domain_manager" name="jform[domain][domain_manager]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_username" id="jform_domain_domain_username-lbl">Domain Username</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_username;?>" id="jform_domain_domain_username" name="jform[domain][domain_username]">      </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_domain_domain_password" id="jform_domain_domain_password-lbl">Domain Password</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$domain_password;?>" id="jform_domain_domain_password" name="jform[domain][domain_password]">     </div>
</div>						           
    </fieldset>
    <fieldset>
    	<legend>Search Engine Optizimation</legend>
        <div class="control-group">
             <label title="" class="hasTip control-label" for="jform_follow_meta_title" id="jform_follow_meta_title-lbl">Meta Title</label>     <div class="controls">
             <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_title;?>" id="jform_follow_meta_title" name="jform[follow][meta_title]">     </div>
        </div>
         <div class="control-group">
              <label title="" class="hasTip control-label" for="jform_follow_meta_keywork" id="jform_follow_meta_keywork-lbl">Meta Keyword</label>      <div class="controls">
              <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_keywork;?>" id="jform_follow_meta_keywork" name="jform[follow][meta_keywork]">      </div>
        </div>
        <div class="control-group">
             <label title="" class="hasTip control-label" for="jform_follow_meta_desc" id="jform_follow_meta_desc-lbl">Meta Description</label>     <div class="controls">
             <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_description;?>" id="jform_follow_meta_desc" name="jform[follow][meta_desc]">     </div>
        </div>
    </fieldset>
    <!--<fieldset>
    	<legend>Social Links</legend>
         <div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_google" id="jform_follow_google-lbl" aria-invalid="false">Google</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$google;?>" id="jform_follow_google" name="jform[follow][google]" aria-invalid="false">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_facebook" id="jform_follow_facebook-lbl">Facebook</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$facebook;?>" id="jform_follow_facebook" name="jform[follow][facebook]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_twitter" id="jform_follow_twitter-lbl">Twitter</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$twitter;?>" id="jform_follow_twitter" name="jform[follow][twitter]">     </div>
</div>
    </fieldset>-->
    <input type="submit" value="Save" name="btnSave" />
</form>
